Page({
  data: {
    bannerList: [
      {
        id: 1,
        imageUrl: 'https://ts1.tc.mm.bing.net/th/id/R-C.148101c205857241d1666d8d55d09eda?rik=emNVnf9uHL79Fg&riu=http%3a%2f%2fclubimg.club.vmall.com%2fdata%2fattachment%2fforum%2f202004%2f21%2f232808a58jxcywkezumtpe.jpg&ehk=lioHPAdzEqJwA%2bFZznIyKDWb6mew5xjFF2JeGHyicvY%3d&risl=&pid=ImgRaw&r=0',
        link: '/pages/detail/detail?id=1'
      },
      {
        id: 2,
        imageUrl: 'https://img1.pconline.com.cn/piclib/200903/26/batch/1/29526/1238079351730dijk3p7c87.jpg',
        link: '/pages/detail/detail?id=2'
      },
      {
        id: 3,
        imageUrl: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.Czf6me33BTB3UP6yjqJ0GQHaEo?r=0&rs=1&pid=ImgDetMain',
        link: '/pages/detail/detail?id=3'
      }
    ],
    activityList: [
      {
        id: 1,
        title: '周末户外徒步活动',
        description: '一起探索大自然的奥秘，感受户外运动的乐趣',
        imageUrl: 'https://picsum.photos/400/200?random=4',
        time: '2024-03-20 14:00',
        location: '城市公园'
      },
      {
        id: 2,
        title: '读书分享会',
        description: '分享你最近读过的好书，交流阅读心得',
        imageUrl: 'https://picsum.photos/400/200?random=5',
        time: '2024-03-21 19:00',
        location: '市图书馆'
      },
      {
        id: 3,
        title: '美食烹饪课程',
        description: '学习制作特色美食，提升烹饪技能',
        imageUrl: 'https://picsum.photos/400/200?random=6',
        time: '2024-03-22 15:00',
        location: '美食工作室'
      },
      {
        id: 4,
        title: '瑜伽体验课',
        description: '放松身心，体验瑜伽带来的平静与力量',
        imageUrl: 'https://picsum.photos/400/200?random=7',
        time: '2024-03-23 10:00',
        location: '瑜伽馆'
      }
    ]
  },

  onLoad() {
    // 页面加载时的逻辑
  },

  onBannerClick(e) {
    const item = e.currentTarget.dataset.item;
    wx.navigateTo({
      url: item.link
    });
  },

  onActivityClick(e) {
    const item = e.currentTarget.dataset.item;
    wx.navigateTo({
      url: `/pages/detail/detail?id=${item.id}`
    });
  }
})
